# 需要开启这个参数，https://github.com/jemalloc/jemalloc/issues/1328
REDIS_HOME=${DEFAULT_REDIS_HOME:-'/opt/software/redis'}
mkdir -p ${REDIS_HOME}
\cp ./redis.conf ${REDIS_HOME}/
sysctl vm.overcommit_memory=1

docker stop redis && docker rm redis
docker run -itd --name redis --restart=always -p 6379:6379 \
 -v ${REDIS_HOME}/redis.conf:/etc/redis/redis.conf \
 -v ${REDIS_HOME}/data:/data \
 redis:7.2.5 redis-server /etc/redis/redis.conf

docker logs -f redis
